
import type { RespSysDataType  } from "../../../api";

export declare namespace RespDataType {
  export type AgentSelectList = RespSysDataType.AgentSelectList;

  export interface AccountItem {
    id: number,
    agentId: number,
    name: string,
    linkman: string,
    linkmanPhone: string,
    address: string,
    status: number,
    remark: string,
    createdAt: string,
    updatedAt: string
  }

  export type AccountPageList = PageList<AccountItem>;

  // 授权秘钥信息
  export interface AuthSecretInfo {
    accountId: string,
    aiotClientId: string,
    aiotClientSecret: string,
    skyClientId: string,
    skyClientSecret: string,
    alarmClientId: string,
    alarmClientSecret: string,
    createTime: string,
  }

  // 报告分组信息
  export interface IReportGroupItem {
    label: string;
    value: string;
  }

  export type ReportGroupList = IReportGroupItem[];
}

export declare namespace RequestDataType {
  export interface CreateAccountItem {
    name: string;
    agentId: number,
    linkman: string;
    linkPhone: string;
    address: string;
    status: number;
    remark: string;
  }

  export interface UpdateAccountItem extends CreateAccountItem { }

  // 初始化账户的管理员
  export interface InitAdminUserParams {
    accountId: number;
    userName: string;
    nickName: string;
    password: string;
    mobile: string;
    email?: string;
    remark?: string;
  }

  // 保存授权秘钥的参数
  export interface SaveAuthSecretParams {
    accountId: string,
    aiotClientId: string,
    aiotClientSecret: string,
    skyClientId: string,
    skyClientSecret: string,
    alarmClientId: string,
    alarmClientSecret: string,
  }
}
